<template>
  <a-card title="木木指数">
    <div id="echartsMain" style="height: 300px"></div>
  </a-card>
</template>

<script>
import * as echarts from 'echarts'
export default {
  nmae: "index-echarts",
  data() {
    return {};
  },
  mounted() {
    this.initEchart();
  },
  methods: {
    initEchart() {
      let chartDom = document.getElementById("echartsMain");
      let myChart = echarts.init(chartDom);
      myChart.setOption({
        legend: {
          data: ["a", "b", "c"],
          bottom: '10',
          icon: 'circle'
        },
        tooltip: {
          show: true,
          axisPointer: {
            type: 'cross',
            animation: true
          },
          backgroundColor: 'rgba(255, 255, 255, .5)'
        },
        radar: {
          // shape: 'circle',
          indicator: [
            { name: "引用", max: 80 },
            { name: "口碑", max: 80 },
            { name: "产量", max: 80 },
            { name: "贡献", max: 80 },
            { name: "热度", max: 80 }
          ],
        },
        series: [
          {
            type: "radar",
            data: [
              {
                value: [10, 40, 20, 60, 10, 60],
                name: "a",
              },
              {
                value: [50, 14, 28, 26, 42, 21],
                name: "b",
              },
              {
                value: [60, 20, 43, 73, 12, 80],
                name: "c",
              },
            ],
          },
        ],
      });
    },
  },
};
</script>
